part of 'component.dart';

class LableView extends StatelessWidget {
  const LableView({
    Key? key,
    required this.size,
    required this.bgImgName,
    required this.title,
    required this.insets,
  }) : super(key: key);
  final Size size;
  final String bgImgName;
  final Widget title;
  final EdgeInsetsGeometry insets;
  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: size.width,
      height: size.height,
      child: Stack(
        children: [
          Image.asset(
            bgImgName,
            width: size.width,
            height: size.height,
            fit: BoxFit.contain,
          ),
          Container(
            padding: insets,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [title],
            ),
          )
        ],
      ),
    );
  }
}
